## Weight Classesheavyweight = pd.read_sql('SELECT * FROM heavyweight', connection) light_heavyweight = pd.read_sql('SELECT * FROM light_heavyweight', connection) middleweight = pd.read_sql('SELECT * FROM middleweight', connection) welterweight = pd.read_sql('SELECT * FROM welterweight', connection) lightweight = pd.read_sql('SELECT * FROM lightweight', connection) featherweight = pd.read_sql('SELECT * FROM featherweight', connection) bantamweight = pd.read_sql('SELECT * FROM bantamweight', connection) flyweight = pd.read_sql('SELECT * FROM flyweight', connection) women_featherweight = pd.read_sql('SELECT * FROM women_featherweight', connection) women_bantamweight = pd.read_sql('SELECT * FROM women_bantamweight', connection) women_flyweight = pd.read_sql('SELECT * FROM women_flyweight', connection) women_strawweight = pd.read_sql('SELECT * FROM women_strawweight', connection)
# Calculate mean and median buyrate for each stance buyrate_avg1 = fb.groupby('EITHER_CHAMP')['Avg_Buyrate_Per_Event'].agg(['mean', 'median']) # Display the statistics buyrate_avg1
# Calculate mean and median buyrate for each stance buyrate_avg2 = fb.groupby('EVER_CHALLENGER')['Avg_Buyrate_Per_Event'].agg(['mean', 'median']) # Display the statistics buyrate_avg2
### Top 1 Percent
# Filter the dataframe using the correct column name "FIGHTER" frame_1 = subset_df[subset_df['FIGHTER'].isin(top_1_percent_list)] frame_1frame_1.describe()
## event_buyrate stats# Display max rows pd.set_option('display.max_rows', None) breakdown(event_buyrate) # Set the display options to show 20 rows at the top and bottom pd.set_option('display.max_rows', 20)